package chap6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] = {8, 4, 2, 1, 23, 344, 12};
        System.out.print("输入数:");
        int x = sc.nextInt();
        for (int i = 0; i < a.length; i++) {
            if (x == a[i]) {
                System.out.println("在其中");
                return;
            } else if (i == a.length - 1) {
                System.out.println("不在其中");
            }
        }
        //System.out.println("不在其中");


//        int []ar=new int[2];
//       // ar[-1]=100;
//        int a2[]=new int[0];

    }
}
